<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加自动回复内容</title>
<link href="__ADMIN_PUBLIC__css/style.css" rel="stylesheet" type="text/css" />
<link href="__ADMIN_PUBLIC__css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__ADMIN_PUBLIC__js/jquery.js"></script>
<script type="text/javascript" src="__ADMIN_PUBLIC__js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__ADMIN_PUBLIC__js/select-ui.min.js"></script>
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
  <link href="__STATIC__/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>

  
<script type="text/javascript">
host ='http://{$Think.const.HOST}/';
root = '__ROOT__/';
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
});
</script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="{:U('Member/Index/welcome/')}">首页</a></li>
    <li><a href="{:U('Member/keyWords/index/')}">自动回复内容管理</a></li>
    <li><a href="{:U('Member/keyWords/addKeyWords/')}">添加自动回复内容</a></li>
    </ul>
    </div>
    
    <div class="formbody">   
    
    <div id="usual1" class="usual"> 
    
    <div class="itab">
  	<ul> 
    <li><a href="#tab1" class="selected">添加自动回复内容</a></li>
  	</ul>
    </div> 
    <form action="" method="post" enctype="multipart/form-data">
  	<div id="tab1" class="tabson">    
    <ul class="forminfo">
    <!--<li><label>Token令牌<b>*</b></label><input name="lname" type="text" class="dfinput" value=""  /></li>-->
   
    <li><label>标题<b>*</b></label> <input name="wxktitle" type="text" class="dfinput" value="{$userInfo.appid}"  />    
    </li>
    
    <li><label>关键字<b>*</b></label> <input name="wxkeyword" type="text" class="dfinput" value="{$userInfo.appsecret}"  />     
    </li>
    
	<li><label>内容<b>*</b></label> <input name="wxkcontent" type="text" class="dfinput" value="{$userInfo.wxnum}"  />    
    </li>	

    
    <li><label>自动回复类型<b>*</b></label>
    
    <div class="vocation">
    <select class="select1" name="wxktype">
    <option value="0" <if condition="$userInfo['wxtype'] eq 0">selected = "selected"</if> >文字</option>
    <option value="1" <if condition="$userInfo['wxtype'] eq 1">selected = "selected"</if> >图片</option>
    <option value="2" <if condition="$userInfo['wxtype'] eq 2">selected = "selected"</if> >视频</option>   
    <option value="2" <if condition="$userInfo['wxtype'] eq 3">selected = "selected"</if> >语音</option> 
    </select>
    </div>
    </li>
    
    </ul>
    
     <ul class="forminfo" id="typeTable" style="display: block;">
    <li class="imgThumb" style="display: none;"><label>预览<b>*</b></label> <img src="" id="imgshow" alt="" />
    </li>
    
     <li>
     	<label><span style="display:inline-block;" class="changeWord">图片</span>连接<b>*</b></label> 
     	<input name="wxkfileurl" type="text" class="dfinput fileUrl" value="{$userInfo.appsecret}"  />
     	<div class="upload" style="display: none;height: 35px;margin-top: -30px;">
  
     	<input id="listIMg" style="top:30px;" name="imgtest" type="file" multiple="true" class="dfinput fileUrllocal" value="{$userInfo.appsecret}"  /> 
     	
                <span style="display:inline-block;margin-left: 80px;">类型: *.jpg 大小: 2000KB 数量: 1</span>
                <script type="text/javascript">
                    $(function() {
                        $('#listIMg').uploadify({
                            'formData'     : {	//POST数据
                                'session_id' : '<?php echo session_id(); ?>',
                            },
                            'fileTypeDesc' : '上传文件',//上传描述
                            'fileTypeExts' : '*.jpg',
                            'swf'      : '__STATIC__uploadify/uploadify.swf',
                            'uploader' : '{:U('Member/KeyWords/uploadImg')}',
                            'buttonText':'选择文件',
                            'fileSizeLimit' : '3000KB',
                            'uploadLimit' : 1000,//上传文件数
                            'width':65,
//                          'debug':true,
                            'height':25,
                            'successTimeout':10,//等待服务器响应时间
                            'removeTimeout' : 0.2,//成功显示时间
                            'onUploadSuccess' : function(file, data, response) {
                                data=$.parseJSON(data);
                                   $('.fileUrl').val(data.thumbPath);
                                   $('#imgshow').attr('src',host+root+data.thumbPath);
                                   $('.imgThumb').show();
                            }
                        });
                    });
                </script>
                </div>
     	<input	type="button" value="网络文件" class="btn webFile" style="margin: 0px 5px;">
     	<input	type="button" class="btn localFile" value="本地文件">     
    </li>
    </ul>
     

    


    <ul class="forminfo">
    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="保存"/></li>
    </ul> 
    
    </div> </form>
    
     <table class="tablelist">
    	<thead>
    	<tr>
        <th>提示信息</th>
        
        </tr>
        </thead>
        <tbody>
        <tr>
      
        <td>
        	<p>你必须进入<a href="https://mp.weixin.qq.com/" target="_blank" style="color: #0000CC;">微信公众平台</a>，选择“开发者中心”，将对应信息在上表中填写完毕提交后，将接口配置信息Url修改为如下网址：</p>

			<p><span style="font-weight: 700;">http://{$Think.server.HTTP_HOST}{:U('Member/Api/index','','')}/?uid={$Think.session.uid} </span></p> 
			
			<p>填写完毕上表后将为您生成唯一Token <if condition="$userInfo">您的唯一Token是<span style="font-weight: 700;display: inline-block;">{$userInfo.wxtoken}</span></if></p>
			
			

			<p>以上网址必须是外网，内网是不可以的，因为腾讯的服务器无法访问你的内网</p>
        </td>
       
        </tr> 
    
        </tbody>
    </table>
    
  	

    
    <script type="text/javascript"> 
   		$(function(){
   			$('.uploadify').css('top','35px');
   		})
    	
    	//选择类型事件
    	$("select[name='wxktype']").change(function(){
    		val = $(this).find('option:selected').val();
    		if(val != 0){
    			$('#typeTable').show();
    			word = $(this).find('option:selected').text();
    			$('.changeWord').html(word);
    		}else{
    			$('#typeTable').hide();
    		}
    	})
    	//选择上传文件方式
    	$('.webFile').click(function(){    //网络文件   		
			$('.upload').hide();
    	})
    	$('.localFile').click(function(){		//本地上传
			$('.upload').css('display','inline-block');
    	})
    </script>
    
    
    
    </div>


</body>

</html>
